<template >
  <div class="app">
    <keep-alive>
      <div class="top">
        <top></top>
      </div>
    </keep-alive>
    <el-container class="info">
      <router-view />
    </el-container>
    <keep-alive>
      <div class="foot" style="width: 100%">
        <el-container>
          <foot class="nav"></foot>
        </el-container>
      </div>
    </keep-alive>
  </div>
</template>
	
<script>
import top from "@/components/home/head.vue";
import foot from "@/components/home/foot.vue";

export default {
  data: function () {
    return {
      // param: {
      //     username: 'admin',
      //     password: '123123',
      // 	loooo:'defined',
      // },
      transitionName: "",
    };
  },
  // watch:{
  // 	  $route(to,from){
  // 	  	  let isBack = this.$router.isBack;
  // 	  	  if(isBack){
  // 	  		  this.transitionName = 'slide-right'
  // 	  	  }else{
  // 	  		  this.transitionName = 'slide-left'
  // 	  	  }
  // 	  	  this.$router.isBack = false
  // 	  },
  // },
  methods: {},
  components: {
    top: top,
    foot: foot,
  },
  mounted() {
    let lobel = this.$refs.tag;
    console.log(lobel);
  },
};
</script>
<style lang="scss" scoped="scoped">
.foot {
  width: 100%;
}
.app {
  display: flex;
  // width: 100%;
  height: 100%;
  // overflow: hidden;
  background: #f7f8f9;
  background: #FFEACE;
  flex-direction: column;
  .top {
    background: #ffffff;
    box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.02);
    margin-bottom: 20px;
    .nav {
      width: 1200px;
      margin: 0 auto;
    }
  }
  .info {
    width: 1200px;
    margin: 0 auto;
    flex: 1;
  }
  .foot {
    background: #E86472;
    width: 100%;
    .nav {
      width: 1200px;
      margin: 0 auto;
    }
  }
  .router-link-active {
    color: yellow;
  }
}
.slide-left-enter,
.slide-right-leave-to {
  opacity: 0;
  transform: translateX(100%);
}

.slide-left-leave-to,
.slide-right-enter {
  opacity: 0;
  transform: translateX(-100%);
}

.slide-left-enter-active,
.slide-left-leave-active,
.slide-right-enter-active,
.slide-right-leave-active {
  transition: 1.5s;
  position: absolute;
  top: 0;
}
</style>